Default to anchors and remove automatic channel acceptance#4354
Default to anchors and remove automatic channel acceptance#4354elnosh wants to merge 4 commits intolightningdevkit:mainfrom
Conversation
|
👋 I see @jkczyz was un-assigned. |
Hmm, can you ask claude to change those to use the |
ef441ac to
b1ee9e3
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4354 +/- ##
=======================================
Coverage 86.01% 86.02%
=======================================
Files 156 156
Lines 102857 102827 -30
Branches 102857 102827 -30
=======================================
- Hits 88474 88453 -21
+ Misses 11876 11865 -11
- Partials 2507 2509 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
1 similar comment
| // If this peer already has some channels, a new channel won't increase our number of peers | ||
| // with unfunded channels, so as long as we aren't over the maximum number of unfunded | ||
| // channels per-peer we can accept channels from a peer with existing ones. | ||
| if is_only_peer_channel && peers_without_funded_channels >= MAX_UNFUNDED_CHANNEL_PEERS { |
There was a problem hiding this comment.
I noticed while running this test: https://github.com/elnosh/rust-lightning/blob/813c0146b3149c85111139fa4649a808a32e7217/lightning/src/ln/channel_open_tests.rs#L92-L110 that it would fail to accept the inbound channel if the number of peers without funded channels was == MAX_UNFUNDED_CHANNEL_PEERS but IIUC it should fail to accept it if the # of channels > MAX_UNFUNDED_CHANNEL_PEERS
There was a problem hiding this comment.
So this code was unreachable before? Let's split the change into a separate commit
There was a problem hiding this comment.
done. It was reachable, just that the failing of new channels was off-by-one.
pending_changelog/4337-manual-channel-accept-default-anchors.txt
Outdated
Show resolved
Hide resolved
b1ee9e3 to
96719d6
Compare
|
This also needs a rebase |
96719d6 to
daf61b3
Compare
|
rebased and renamed channel config to default to anchors |
daf61b3 to
927b6c1
Compare
|
Feel free to squash |
When accepting channels manually, it would fail if the # of peers without funded channels was == `MAX_UNFUNDED_CHANNEL_PEERS`, however, it should fail if the # of peers > `MAX_UNFUNDED_CHANNEL_PEERS`.
Removes the `manually_accept_inbound_channels` config option. In upcoming commit we will default to anchor channels which requires users checking if they have enough onchain funds to cover fees in case of a force close. Hence, we move to always require users to manually accept inbound channels.
Set `negotiate_anchors_zero_fee_htlc_tx` default to true.
Now that anchor channels are the default, rename `test_default_anchors_channel_config` to `test_default_channel_config` and the previous default to legacy.
927b6c1 to
306eea7
Compare
Closes #4337
Changes
negotiate_anchors_zero_fee_htlc_txdefault to true and removes themanually_accept_inbound_channelsconfig option.Edit: Left the tests with default to non-anchor